<?php
require_once('classes/Databases.class.php');

class Pengumuman extends Databases{
  protected $sqlFile='com/pengumuman/bussines/pengumuman.sql.php';
  public function __construct(){
    parent::__construct();
  }
  function getPengumuman($dosenId){
    $result=$this->open($this->sqlQueries['get_pengumuman'],array($dosenId));
    return $result;
  }
  function getPengumumanByMhsId($mhsId){
    $result=$this->open($this->sqlQueries['get_pengumuman_by_mhs_id'],array($mhsId));
    return $result;
  }
  function getPengumumanById($pengId){
    $result=$this->execute($this->sqlQueries['get_pengumuman_by_id'],array($pengId));
    return $result;
  }
  function doAddPegumuman($pengJudul,$pengDosen,$pengIsi){
    $result=$this->execute($this->sqlQueries['do_add_pengumuman'],array($pengJudul,$pengDosen,$pengIsi));
    return $result;
  }
  function doUpdatepengumuman($pengJudul,$pengDosen,$pengIsi,$pengId){
    $result=$this->execute($this->sqlQueries['do_update_pengumunan'],array($pengJudul,$pengDosen,$pengIsi,$pengId));
    return $result;
  }
}
?>
